home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok15.lha
/
Seafarers_Manual
/
Source
/
Main2.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
741b
|
46 lines
MODULE Main2; (* Export the entire module *)
(* From the book "Modula-2 A Seafarer's Manual and Shipyard Guide" *)
(* Page 177 adapted "Amiga M2Modula-2" 13 Mar 1988 *)
FROM InOut IMPORT Write,
WriteLn;
MODULE A;
EXPORT B,C,x; (* x, B.x, C.x, B.C.x visible here *)
MODULE B;
EXPORT C,x; (* x, C.x visible here *)
MODULE C;
EXPORT x; (* x visible here *)
CONST
x = "!";
END C;
END B;
END A;
BEGIN (* Main *)
Write (x); (* these all refer to x *)
Write (A.x);
Write (B.x);
Write (C.x);
Write (A.B.x);
Write (A.C.x);
Write (B.C.x);
Write (A.B.C.x);
WriteLn; WriteLn;
END Main2.